package liurong.driver.hash;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.SortedMap;
import java.util.TreeMap;

import org.apache.commons.collections4.multiset.SynchronizedMultiSet;

public class HashTest {
	public static void main(String[] args) throws Exception {
		/**
		 * 
		 * 366712642
		 * 
		 * 183768910
		 */
		System.out.println(System.identityHashCode("liurong"));
		System.out.println("liurong".hashCode());

		TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
		treeMap.put(1111111, "1111111");
		treeMap.put(2, "2");
		treeMap.put(5, "6");
		treeMap.put(1, "1");
		treeMap.put(555555555, "555555555");
		System.out.println(treeMap);
		SortedMap<Integer, String> tailMap = treeMap.tailMap(111);
		System.out.println(tailMap);
		System.out.println(tailMap.firstKey());

		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
		Date parse = simpleDateFormat.parse("2013-05-24");
		System.out.println(parse);
		Date parse2 = simpleDateFormat.parse("2018-12-24");
		System.out.println(parse2);

		System.out.println("-------------------------");

		System.out.println((parse2.getTime() - parse.getTime()) / (1000 * 60 * 60 * 24));
	}
}
